-- Copyright 2002-2008.  Adobe Systems, Incorporated.  All rights reserved.
-- Sample script to create a new text  item and change it's contents.

tell application "Adobe Photoshop CS4"
	activate
	
	-- Create a new document and art layer.
	set docRef to make new document with properties {width:3 as inches, height:2 as inches}
	set artLayerRef to make new art layer in docRef
	
	-- Set the art layer's name.  This is not necessary
	-- but makes the layer more identifiable.
	set name of artLayerRef to "MyNewTextLayer"
	
	-- Tell the art layer that is a text layer.
	set kind of artLayerRef to text layer
	
	-- Get a reference to the text item and set its contents.
	set textItemRef to text object of artLayerRef
	set contents of contents of textItemRef to "Hello, World!"
	
end tell